//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension MigrationHubOrchestrator {
    // MARK: Enums

    public enum DataType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case integer = "INTEGER"
        case string = "STRING"
        case stringlist = "STRINGLIST"
        case stringmap = "STRINGMAP"
        public var description: String { return self.rawValue }
    }

    public enum MigrationWorkflowStatusEnum: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case completed = "COMPLETED"
        case creating = "CREATING"
        case creationFailed = "CREATION_FAILED"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case deletionFailed = "DELETION_FAILED"
        case inProgress = "IN_PROGRESS"
        case notStarted = "NOT_STARTED"
        case paused = "PAUSED"
        case pausing = "PAUSING"
        case pausingFailed = "PAUSING_FAILED"
        case starting = "STARTING"
        case userAttentionRequired = "USER_ATTENTION_REQUIRED"
        case workflowFailed = "WORKFLOW_FAILED"
        public var description: String { return self.rawValue }
    }

    public enum Owner: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case awsManaged = "AWS_MANAGED"
        case custom = "CUSTOM"
        public var description: String { return self.rawValue }
    }

    public enum PluginHealth: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case healthy = "HEALTHY"
        case unhealthy = "UNHEALTHY"
        public var description: String { return self.rawValue }
    }

    public enum RunEnvironment: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case aws = "AWS"
        case onpremise = "ONPREMISE"
        public var description: String { return self.rawValue }
    }

    public enum StepActionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case automated = "AUTOMATED"
        case manual = "MANUAL"
        public var description: String { return self.rawValue }
    }

    public enum StepGroupStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case awaitingDependencies = "AWAITING_DEPENDENCIES"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case paused = "PAUSED"
        case pausing = "PAUSING"
        case ready = "READY"
        case userAttentionRequired = "USER_ATTENTION_REQUIRED"
        public var description: String { return self.rawValue }
    }

    public enum StepStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case awaitingDependencies = "AWAITING_DEPENDENCIES"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case paused = "PAUSED"
        case ready = "READY"
        case skipped = "SKIPPED"
        case userAttentionRequired = "USER_ATTENTION_REQUIRED"
        public var description: String { return self.rawValue }
    }

    public enum TargetType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case all = "ALL"
        case none = "NONE"
        case single = "SINGLE"
        public var description: String { return self.rawValue }
    }

    public enum TemplateStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case created = "CREATED"
        case creating = "CREATING"
        case creationFailed = "CREATION_FAILED"
        case pendingCreation = "PENDING_CREATION"
        case ready = "READY"
        public var description: String { return self.rawValue }
    }

    public enum StepInput: AWSEncodableShape & AWSDecodableShape, Sendable {
        /// The value of the integer.
        case integerValue(Int)
        /// List of string values.
        case listOfStringsValue([String])
        /// Map of string values.
        case mapOfStringValue([String: String])
        /// String value.
        case stringValue(String)

        public init(from decoder: Decoder) throws {
            let container = try decoder.container(keyedBy: CodingKeys.self)
            guard container.allKeys.count == 1, let key = container.allKeys.first else {
                let context = DecodingError.Context(
                    codingPath: container.codingPath,
                    debugDescription: "Expected exactly one key, but got \(container.allKeys.count)"
                )
                throw DecodingError.dataCorrupted(context)
            }
            switch key {
            case .integerValue:
                let value = try container.decode(Int.self, forKey: .integerValue)
                self = .integerValue(value)
            case .listOfStringsValue:
                let value = try container.decode([String].self, forKey: .listOfStringsValue)
                self = .listOfStringsValue(value)
            case .mapOfStringValue:
                let value = try container.decode([String: String].self, forKey: .mapOfStringValue)
                self = .mapOfStringValue(value)
            case .stringValue:
                let value = try container.decode(String.self, forKey: .stringValue)
                self = .stringValue(value)
            }
        }

        public func encode(to encoder: Encoder) throws {
            var container = encoder.container(keyedBy: CodingKeys.self)
            switch self {
            case .integerValue(let value):
                try container.encode(value, forKey: .integerValue)
            case .listOfStringsValue(let value):
                try container.encode(value, forKey: .listOfStringsValue)
            case .mapOfStringValue(let value):
                try container.encode(value, forKey: .mapOfStringValue)
            case .stringValue(let value):
                try container.encode(value, forKey: .stringValue)
            }
        }

        public func validate(name: String) throws {
            switch self {
            case .listOfStringsValue(let value):
                try value.forEach {
                    try validate($0, name: "listOfStringsValue[]", parent: name, max: 500)
                }
            case .mapOfStringValue(let value):
                try value.forEach {
                    try validate($0.key, name: "mapOfStringValue.key", parent: name, max: 100)
                    try validate($0.key, name: "mapOfStringValue.key", parent: name, min: 1)
                    try validate($0.key, name: "mapOfStringValue.key", parent: name, pattern: "^[a-zA-Z0-9-_ ()]+$")
                    try validate($0.value, name: "mapOfStringValue[\"\($0.key)\"]", parent: name, max: 100)
                }
            case .stringValue(let value):
                try self.validate(value, name: "stringValue", parent: name, max: 100)
            default:
                break
            }
        }

        private enum CodingKeys: String, CodingKey {
            case integerValue = "integerValue"
            case listOfStringsValue = "listOfStringsValue"
            case mapOfStringValue = "mapOfStringValue"
            case stringValue = "stringValue"
        }
    }

    public enum WorkflowStepOutputUnion: AWSEncodableShape & AWSDecodableShape, Sendable {
        /// The integer value.
        case integerValue(Int)
        /// The list of string value.
        case listOfStringValue([String])
        /// The string value.
        case stringValue(String)

        public init(from decoder: Decoder) throws {
            let container = try decoder.container(keyedBy: CodingKeys.self)
            guard container.allKeys.count == 1, let key = container.allKeys.first else {
                let context = DecodingError.Context(
                    codingPath: container.codingPath,
                    debugDescription: "Expected exactly one key, but got \(container.allKeys.count)"
                )
                throw DecodingError.dataCorrupted(context)
            }
            switch key {
            case .integerValue:
                let value = try container.decode(Int.self, forKey: .integerValue)
                self = .integerValue(value)
            case .listOfStringValue:
                let value = try container.decode([String].self, forKey: .listOfStringValue)
                self = .listOfStringValue(value)
            case .stringValue:
                let value = try container.decode(String.self, forKey: .stringValue)
                self = .stringValue(value)
            }
        }

        public func encode(to encoder: Encoder) throws {
            var container = encoder.container(keyedBy: CodingKeys.self)
            switch self {
            case .integerValue(let value):
                try container.encode(value, forKey: .integerValue)
            case .listOfStringValue(let value):
                try container.encode(value, forKey: .listOfStringValue)
            case .stringValue(let value):
                try container.encode(value, forKey: .stringValue)
            }
        }

        public func validate(name: String) throws {
            switch self {
            case .listOfStringValue(let value):
                try value.forEach {
                    try validate($0, name: "listOfStringValue[]", parent: name, max: 2048)
                }
            case .stringValue(let value):
                try self.validate(value, name: "stringValue", parent: name, max: 2048)
            default:
                break
            }
        }

        private enum CodingKeys: String, CodingKey {
            case integerValue = "integerValue"
            case listOfStringValue = "listOfStringValue"
            case stringValue = "stringValue"
        }
    }

    // MARK: Shapes

    public struct CreateMigrationWorkflowRequest: AWSEncodableShape {
        /// The configuration ID of the application configured in Application Discovery Service.
        public let applicationConfigurationId: String?
        /// The description of the migration workflow.
        public let description: String?
        /// The input parameters required to create a migration workflow.
        public let inputParameters: [String: StepInput]
        /// The name of the migration workflow.
        public let name: String
        /// The servers on which a step will be run.
        public let stepTargets: [String]?
        /// The tags to add on a migration workflow.
        public let tags: [String: String]?
        /// The ID of the template.
        public let templateId: String

        @inlinable
        public init(applicationConfigurationId: String? = nil, description: String? = nil, inputParameters: [String: StepInput], name: String, stepTargets: [String]? = nil, tags: [String: String]? = nil, templateId: String) {
            self.applicationConfigurationId = applicationConfigurationId
            self.description = description
            self.inputParameters = inputParameters
            self.name = name
            self.stepTargets = stepTargets
            self.tags = tags
            self.templateId = templateId
        }

        public func validate(name: String) throws {
            try self.inputParameters.forEach {
                try validate($0.key, name: "inputParameters.key", parent: name, max: 100)
                try validate($0.key, name: "inputParameters.key", parent: name, min: 1)
                try validate($0.key, name: "inputParameters.key", parent: name, pattern: "^[a-zA-Z0-9-_ ()]+$")
                try $0.value.validate(name: "\(name).inputParameters[\"\($0.key)\"]")
            }
            try self.stepTargets?.forEach {
                try validate($0, name: "stepTargets[]", parent: name, max: 500)
            }
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 100)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^[a-zA-Z0-9-_ ()]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 100)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case applicationConfigurationId = "applicationConfigurationId"
            case description = "description"
            case inputParameters = "inputParameters"
            case name = "name"
            case stepTargets = "stepTargets"
            case tags = "tags"
            case templateId = "templateId"
        }
    }

    public struct CreateMigrationWorkflowResponse: AWSDecodableShape {
        /// The configuration ID of the application configured in Application Discovery Service.
        public let adsApplicationConfigurationId: String?
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// The time at which the migration workflow was created.
        public let creationTime: Date?
        /// The description of the migration workflow.
        public let description: String?
        /// The ID of the migration workflow.
        public let id: String?
        /// The name of the migration workflow.
        public let name: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The servers on which a step will be run.
        public let stepTargets: [String]?
        /// The tags to add on a migration workflow.
        public let tags: [String: String]?
        /// The ID of the template.
        public let templateId: String?
        /// The inputs for creating a migration workflow.
        public let workflowInputs: [String: StepInput]?

        @inlinable
        public init(adsApplicationConfigurationId: String? = nil, arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, name: String? = nil, status: MigrationWorkflowStatusEnum? = nil, stepTargets: [String]? = nil, tags: [String: String]? = nil, templateId: String? = nil, workflowInputs: [String: StepInput]? = nil) {
            self.adsApplicationConfigurationId = adsApplicationConfigurationId
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.name = name
            self.status = status
            self.stepTargets = stepTargets
            self.tags = tags
            self.templateId = templateId
            self.workflowInputs = workflowInputs
        }

        private enum CodingKeys: String, CodingKey {
            case adsApplicationConfigurationId = "adsApplicationConfigurationId"
            case arn = "arn"
            case creationTime = "creationTime"
            case description = "description"
            case id = "id"
            case name = "name"
            case status = "status"
            case stepTargets = "stepTargets"
            case tags = "tags"
            case templateId = "templateId"
            case workflowInputs = "workflowInputs"
        }
    }

    public struct CreateTemplateRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Idempotency in the Smithy documentation.
        public let clientToken: String?
        /// The tags to add to the migration workflow template.
        public let tags: [String: String]?
        /// A description of the migration workflow template.
        public let templateDescription: String?
        /// The name of the migration workflow template.
        public let templateName: String
        /// The source of the migration workflow template.
        public let templateSource: TemplateSource

        @inlinable
        public init(clientToken: String? = CreateTemplateRequest.idempotencyToken(), tags: [String: String]? = nil, templateDescription: String? = nil, templateName: String, templateSource: TemplateSource) {
            self.clientToken = clientToken
            self.tags = tags
            self.templateDescription = templateDescription
            self.templateName = templateName
            self.templateSource = templateSource
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[-a-zA-Z0-9]*$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.templateSource.validate(name: "\(name).templateSource")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case tags = "tags"
            case templateDescription = "templateDescription"
            case templateName = "templateName"
            case templateSource = "templateSource"
        }
    }

    public struct CreateTemplateResponse: AWSDecodableShape {
        /// The tags added to the migration workflow template.
        public let tags: [String: String]?
        /// The Amazon Resource Name (ARN) of the migration workflow template. The format for an Migration Hub Orchestrator template ARN is arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234. For more information about ARNs, see Amazon Resource Names (ARNs) in the AWS General Reference.
        public let templateArn: String?
        /// The ID of the migration workflow template.
        public let templateId: String?

        @inlinable
        public init(tags: [String: String]? = nil, templateArn: String? = nil, templateId: String? = nil) {
            self.tags = tags
            self.templateArn = templateArn
            self.templateId = templateId
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
            case templateArn = "templateArn"
            case templateId = "templateId"
        }
    }

    public struct CreateWorkflowStepGroupRequest: AWSEncodableShape {
        /// The description of the step group.
        public let description: String?
        /// The name of the step group.
        public let name: String
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?
        /// The ID of the migration workflow that will contain the step group.
        public let workflowId: String

        @inlinable
        public init(description: String? = nil, name: String, next: [String]? = nil, previous: [String]? = nil, workflowId: String) {
            self.description = description
            self.name = name
            self.next = next
            self.previous = previous
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[-a-zA-Z0-9_.+, ]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.next?.forEach {
                try validate($0, name: "next[]", parent: name, max: 500)
            }
            try self.previous?.forEach {
                try validate($0, name: "previous[]", parent: name, max: 500)
            }
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case name = "name"
            case next = "next"
            case previous = "previous"
            case workflowId = "workflowId"
        }
    }

    public struct CreateWorkflowStepGroupResponse: AWSDecodableShape {
        /// The time at which the step group is created.
        public let creationTime: Date?
        /// The description of the step group.
        public let description: String?
        /// The ID of the step group.
        public let id: String?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?
        /// The ID of the migration workflow that contains the step group.
        public let workflowId: String?

        @inlinable
        public init(creationTime: Date? = nil, description: String? = nil, id: String? = nil, name: String? = nil, next: [String]? = nil, previous: [String]? = nil, tools: [Tool]? = nil, workflowId: String? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.name = name
            self.next = next
            self.previous = previous
            self.tools = tools
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "creationTime"
            case description = "description"
            case id = "id"
            case name = "name"
            case next = "next"
            case previous = "previous"
            case tools = "tools"
            case workflowId = "workflowId"
        }
    }

    public struct CreateWorkflowStepRequest: AWSEncodableShape {
        /// The description of the step.
        public let description: String?
        /// The name of the step.
        public let name: String
        /// The next step.
        public let next: [String]?
        /// The key value pairs added for the expected output.
        public let outputs: [WorkflowStepOutput]?
        /// The previous step.
        public let previous: [String]?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType
        /// The ID of the step group.
        public let stepGroupId: String
        /// The servers on which a step will be run.
        public let stepTarget: [String]?
        /// The ID of the migration workflow.
        public let workflowId: String
        /// The custom script to run tests on source or target environments.
        public let workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration?

        @inlinable
        public init(description: String? = nil, name: String, next: [String]? = nil, outputs: [WorkflowStepOutput]? = nil, previous: [String]? = nil, stepActionType: StepActionType, stepGroupId: String, stepTarget: [String]? = nil, workflowId: String, workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration? = nil) {
            self.description = description
            self.name = name
            self.next = next
            self.outputs = outputs
            self.previous = previous
            self.stepActionType = stepActionType
            self.stepGroupId = stepGroupId
            self.stepTarget = stepTarget
            self.workflowId = workflowId
            self.workflowStepAutomationConfiguration = workflowStepAutomationConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[-a-zA-Z0-9_.+, ]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.next?.forEach {
                try validate($0, name: "next[]", parent: name, max: 500)
            }
            try self.outputs?.forEach {
                try $0.validate(name: "\(name).outputs[]")
            }
            try self.previous?.forEach {
                try validate($0, name: "previous[]", parent: name, max: 500)
            }
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.stepTarget?.forEach {
                try validate($0, name: "stepTarget[]", parent: name, max: 500)
            }
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.workflowStepAutomationConfiguration?.validate(name: "\(name).workflowStepAutomationConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case name = "name"
            case next = "next"
            case outputs = "outputs"
            case previous = "previous"
            case stepActionType = "stepActionType"
            case stepGroupId = "stepGroupId"
            case stepTarget = "stepTarget"
            case workflowId = "workflowId"
            case workflowStepAutomationConfiguration = "workflowStepAutomationConfiguration"
        }
    }

    public struct CreateWorkflowStepResponse: AWSDecodableShape {
        /// The ID of the step.
        public let id: String?
        /// The name of the step.
        public let name: String?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The ID of the migration workflow.
        public let workflowId: String?

        @inlinable
        public init(id: String? = nil, name: String? = nil, stepGroupId: String? = nil, workflowId: String? = nil) {
            self.id = id
            self.name = name
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case name = "name"
            case stepGroupId = "stepGroupId"
            case workflowId = "workflowId"
        }
    }

    public struct DeleteMigrationWorkflowRequest: AWSEncodableShape {
        /// The ID of the migration workflow you want to delete.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteMigrationWorkflowResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// The ID of the migration workflow.
        public let id: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?

        @inlinable
        public init(arn: String? = nil, id: String? = nil, status: MigrationWorkflowStatusEnum? = nil) {
            self.arn = arn
            self.id = id
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case id = "id"
            case status = "status"
        }
    }

    public struct DeleteTemplateRequest: AWSEncodableShape {
        /// The ID of the request to delete a migration workflow template.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteTemplateResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteWorkflowStepGroupRequest: AWSEncodableShape {
        /// The ID of the step group you want to delete.
        public let id: String
        /// The ID of the migration workflow.
        public let workflowId: String

        @inlinable
        public init(id: String, workflowId: String) {
            self.id = id
            self.workflowId = workflowId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodeQuery(self.workflowId, key: "workflowId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteWorkflowStepGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteWorkflowStepRequest: AWSEncodableShape {
        /// The ID of the step you want to delete.
        public let id: String
        /// The ID of the step group that contains the step you want to delete.
        public let stepGroupId: String
        /// The ID of the migration workflow.
        public let workflowId: String

        @inlinable
        public init(id: String, stepGroupId: String, workflowId: String) {
            self.id = id
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodeQuery(self.stepGroupId, key: "stepGroupId")
            request.encodeQuery(self.workflowId, key: "workflowId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteWorkflowStepResponse: AWSDecodableShape {
        public init() {}
    }

    public struct GetMigrationWorkflowRequest: AWSEncodableShape {
        /// The ID of the migration workflow.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetMigrationWorkflowResponse: AWSDecodableShape {
        /// The configuration ID of the application configured in Application Discovery Service.
        public let adsApplicationConfigurationId: String?
        /// The name of the application configured in Application Discovery Service.
        public let adsApplicationName: String?
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// Get a list of completed steps in the migration workflow.
        public let completedSteps: Int?
        /// The time at which the migration workflow was created.
        public let creationTime: Date?
        /// The description of the migration workflow.
        public let description: String?
        /// The time at which the migration workflow ended.
        public let endTime: Date?
        /// The ID of the migration workflow.
        public let id: String?
        /// The time at which the migration workflow was last modified.
        public let lastModifiedTime: Date?
        /// The time at which the migration workflow was last started.
        public let lastStartTime: Date?
        /// The time at which the migration workflow was last stopped.
        public let lastStopTime: Date?
        /// The name of the migration workflow.
        public let name: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The status message of the migration workflow.
        public let statusMessage: String?
        /// The tags added to the migration workflow.
        public let tags: [String: String]?
        /// The ID of the template.
        public let templateId: String?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?
        /// The total number of steps in the migration workflow.
        public let totalSteps: Int?
        /// The Amazon S3 bucket where the migration logs are stored.
        public let workflowBucket: String?
        /// The inputs required for creating the migration workflow.
        public let workflowInputs: [String: StepInput]?

        @inlinable
        public init(adsApplicationConfigurationId: String? = nil, adsApplicationName: String? = nil, arn: String? = nil, completedSteps: Int? = nil, creationTime: Date? = nil, description: String? = nil, endTime: Date? = nil, id: String? = nil, lastModifiedTime: Date? = nil, lastStartTime: Date? = nil, lastStopTime: Date? = nil, name: String? = nil, status: MigrationWorkflowStatusEnum? = nil, statusMessage: String? = nil, tags: [String: String]? = nil, templateId: String? = nil, tools: [Tool]? = nil, totalSteps: Int? = nil, workflowBucket: String? = nil, workflowInputs: [String: StepInput]? = nil) {
            self.adsApplicationConfigurationId = adsApplicationConfigurationId
            self.adsApplicationName = adsApplicationName
            self.arn = arn
            self.completedSteps = completedSteps
            self.creationTime = creationTime
            self.description = description
            self.endTime = endTime
            self.id = id
            self.lastModifiedTime = lastModifiedTime
            self.lastStartTime = lastStartTime
            self.lastStopTime = lastStopTime
            self.name = name
            self.status = status
            self.statusMessage = statusMessage
            self.tags = tags
            self.templateId = templateId
            self.tools = tools
            self.totalSteps = totalSteps
            self.workflowBucket = workflowBucket
            self.workflowInputs = workflowInputs
        }

        private enum CodingKeys: String, CodingKey {
            case adsApplicationConfigurationId = "adsApplicationConfigurationId"
            case adsApplicationName = "adsApplicationName"
            case arn = "arn"
            case completedSteps = "completedSteps"
            case creationTime = "creationTime"
            case description = "description"
            case endTime = "endTime"
            case id = "id"
            case lastModifiedTime = "lastModifiedTime"
            case lastStartTime = "lastStartTime"
            case lastStopTime = "lastStopTime"
            case name = "name"
            case status = "status"
            case statusMessage = "statusMessage"
            case tags = "tags"
            case templateId = "templateId"
            case tools = "tools"
            case totalSteps = "totalSteps"
            case workflowBucket = "workflowBucket"
            case workflowInputs = "workflowInputs"
        }
    }

    public struct GetMigrationWorkflowTemplateRequest: AWSEncodableShape {
        /// The ID of the template.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetMigrationWorkflowTemplateResponse: AWSDecodableShape {
        /// The time at which the template was last created.
        public let creationTime: Date?
        /// The time at which the template was last created.
        public let description: String?
        /// The ID of the template.
        public let id: String?
        /// The inputs provided for the creation of the migration workflow.
        public let inputs: [TemplateInput]?
        /// The name of the template.
        public let name: String?
        /// The owner of the migration workflow template.
        public let owner: String?
        /// The status of the template.
        public let status: TemplateStatus?
        /// The status message of retrieving migration workflow templates.
        public let statusMessage: String?
        /// The tags added to the migration workflow template.
        public let tags: [String: String]?
        /// &gt;The Amazon Resource Name (ARN) of the migration workflow template. The format for an Migration Hub Orchestrator template ARN is arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234. For more information about ARNs, see Amazon Resource Names (ARNs) in the AWS General Reference.
        public let templateArn: String?
        /// The class of the migration workflow template. The available template classes are:   A2C   MGN   SAP_MULTI   SQL_EC2   SQL_RDS   VMIE
        public let templateClass: String?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?

        @inlinable
        public init(creationTime: Date? = nil, description: String? = nil, id: String? = nil, inputs: [TemplateInput]? = nil, name: String? = nil, owner: String? = nil, status: TemplateStatus? = nil, statusMessage: String? = nil, tags: [String: String]? = nil, templateArn: String? = nil, templateClass: String? = nil, tools: [Tool]? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.inputs = inputs
            self.name = name
            self.owner = owner
            self.status = status
            self.statusMessage = statusMessage
            self.tags = tags
            self.templateArn = templateArn
            self.templateClass = templateClass
            self.tools = tools
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "creationTime"
            case description = "description"
            case id = "id"
            case inputs = "inputs"
            case name = "name"
            case owner = "owner"
            case status = "status"
            case statusMessage = "statusMessage"
            case tags = "tags"
            case templateArn = "templateArn"
            case templateClass = "templateClass"
            case tools = "tools"
        }
    }

    public struct GetTemplateStepGroupRequest: AWSEncodableShape {
        /// The ID of the step group.
        public let id: String
        /// The ID of the template.
        public let templateId: String

        @inlinable
        public init(id: String, templateId: String) {
            self.id = id
            self.templateId = templateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodePath(self.templateId, key: "templateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.templateId, name: "templateId", parent: name, max: 100)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetTemplateStepGroupResponse: AWSDecodableShape {
        /// The time at which the step group was created.
        public let creationTime: Date?
        /// The description of the step group.
        public let description: String?
        /// The ID of the step group.
        public let id: String?
        /// The time at which the step group was last modified.
        public let lastModifiedTime: Date?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?
        /// The status of the step group.
        public let status: StepGroupStatus?
        /// The ID of the template.
        public let templateId: String?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?

        @inlinable
        public init(creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastModifiedTime: Date? = nil, name: String? = nil, next: [String]? = nil, previous: [String]? = nil, status: StepGroupStatus? = nil, templateId: String? = nil, tools: [Tool]? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.next = next
            self.previous = previous
            self.status = status
            self.templateId = templateId
            self.tools = tools
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "creationTime"
            case description = "description"
            case id = "id"
            case lastModifiedTime = "lastModifiedTime"
            case name = "name"
            case next = "next"
            case previous = "previous"
            case status = "status"
            case templateId = "templateId"
            case tools = "tools"
        }
    }

    public struct GetTemplateStepRequest: AWSEncodableShape {
        /// The ID of the step.
        public let id: String
        /// The ID of the step group.
        public let stepGroupId: String
        /// The ID of the template.
        public let templateId: String

        @inlinable
        public init(id: String, stepGroupId: String, templateId: String) {
            self.id = id
            self.stepGroupId = stepGroupId
            self.templateId = templateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodeQuery(self.stepGroupId, key: "stepGroupId")
            request.encodeQuery(self.templateId, key: "templateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.templateId, name: "templateId", parent: name, max: 100)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetTemplateStepResponse: AWSDecodableShape {
        /// The time at which the step was created.
        public let creationTime: String?
        /// The description of the step.
        public let description: String?
        /// The ID of the step.
        public let id: String?
        /// The name of the step.
        public let name: String?
        /// The next step.
        public let next: [String]?
        /// The outputs of the step.
        public let outputs: [StepOutput]?
        /// The previous step.
        public let previous: [String]?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType?
        /// The custom script to run tests on source or target environments.
        public let stepAutomationConfiguration: StepAutomationConfiguration?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The ID of the template.
        public let templateId: String?

        @inlinable
        public init(creationTime: String? = nil, description: String? = nil, id: String? = nil, name: String? = nil, next: [String]? = nil, outputs: [StepOutput]? = nil, previous: [String]? = nil, stepActionType: StepActionType? = nil, stepAutomationConfiguration: StepAutomationConfiguration? = nil, stepGroupId: String? = nil, templateId: String? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.name = name
            self.next = next
            self.outputs = outputs
            self.previous = previous
            self.stepActionType = stepActionType
            self.stepAutomationConfiguration = stepAutomationConfiguration
            self.stepGroupId = stepGroupId
            self.templateId = templateId
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "creationTime"
            case description = "description"
            case id = "id"
            case name = "name"
            case next = "next"
            case outputs = "outputs"
            case previous = "previous"
            case stepActionType = "stepActionType"
            case stepAutomationConfiguration = "stepAutomationConfiguration"
            case stepGroupId = "stepGroupId"
            case templateId = "templateId"
        }
    }

    public struct GetWorkflowStepGroupRequest: AWSEncodableShape {
        /// The ID of the step group.
        public let id: String
        /// The ID of the migration workflow.
        public let workflowId: String

        @inlinable
        public init(id: String, workflowId: String) {
            self.id = id
            self.workflowId = workflowId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodeQuery(self.workflowId, key: "workflowId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetWorkflowStepGroupResponse: AWSDecodableShape {
        /// The time at which the step group was created.
        public let creationTime: Date?
        /// The description of the step group.
        public let description: String?
        /// The time at which the step group ended.
        public let endTime: Date?
        /// The ID of the step group.
        public let id: String?
        /// The time at which the step group was last modified.
        public let lastModifiedTime: Date?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The owner of the step group.
        public let owner: Owner?
        /// The previous step group.
        public let previous: [String]?
        /// The status of the step group.
        public let status: StepGroupStatus?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?
        /// The ID of the migration workflow.
        public let workflowId: String?

        @inlinable
        public init(creationTime: Date? = nil, description: String? = nil, endTime: Date? = nil, id: String? = nil, lastModifiedTime: Date? = nil, name: String? = nil, next: [String]? = nil, owner: Owner? = nil, previous: [String]? = nil, status: StepGroupStatus? = nil, tools: [Tool]? = nil, workflowId: String? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.endTime = endTime
            self.id = id
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.next = next
            self.owner = owner
            self.previous = previous
            self.status = status
            self.tools = tools
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "creationTime"
            case description = "description"
            case endTime = "endTime"
            case id = "id"
            case lastModifiedTime = "lastModifiedTime"
            case name = "name"
            case next = "next"
            case owner = "owner"
            case previous = "previous"
            case status = "status"
            case tools = "tools"
            case workflowId = "workflowId"
        }
    }

    public struct GetWorkflowStepRequest: AWSEncodableShape {
        /// The ID of the step.
        public let id: String
        /// The ID of the step group.
        public let stepGroupId: String
        /// The ID of the migration workflow.
        public let workflowId: String

        @inlinable
        public init(id: String, stepGroupId: String, workflowId: String) {
            self.id = id
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodeQuery(self.stepGroupId, key: "stepGroupId")
            request.encodeQuery(self.workflowId, key: "workflowId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetWorkflowStepResponse: AWSDecodableShape {
        /// The time at which the step was created.
        public let creationTime: Date?
        /// The description of the step.
        public let description: String?
        /// The time at which the step ended.
        public let endTime: Date?
        /// The time at which the workflow was last started.
        public let lastStartTime: Date?
        /// The name of the step.
        public let name: String?
        /// The next step.
        public let next: [String]?
        /// The number of servers that have been migrated.
        public let noOfSrvCompleted: Int?
        /// The number of servers that have failed to migrate.
        public let noOfSrvFailed: Int?
        /// The outputs of the step.
        public let outputs: [WorkflowStepOutput]?
        /// The owner of the step.
        public let owner: Owner?
        /// The previous step.
        public let previous: [String]?
        /// The output location of the script.
        public let scriptOutputLocation: String?
        /// The status of the step.
        public let status: StepStatus?
        /// The status message of the migration workflow.
        public let statusMessage: String?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The ID of the step.
        public let stepId: String?
        /// The servers on which a step will be run.
        public let stepTarget: [String]?
        /// The total number of servers that have been migrated.
        public let totalNoOfSrv: Int?
        /// The ID of the migration workflow.
        public let workflowId: String?
        /// The custom script to run tests on source or target environments.
        public let workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration?

        @inlinable
        public init(creationTime: Date? = nil, description: String? = nil, endTime: Date? = nil, lastStartTime: Date? = nil, name: String? = nil, next: [String]? = nil, noOfSrvCompleted: Int? = nil, noOfSrvFailed: Int? = nil, outputs: [WorkflowStepOutput]? = nil, owner: Owner? = nil, previous: [String]? = nil, scriptOutputLocation: String? = nil, status: StepStatus? = nil, statusMessage: String? = nil, stepActionType: StepActionType? = nil, stepGroupId: String? = nil, stepId: String? = nil, stepTarget: [String]? = nil, totalNoOfSrv: Int? = nil, workflowId: String? = nil, workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.endTime = endTime
            self.lastStartTime = lastStartTime
            self.name = name
            self.next = next
            self.noOfSrvCompleted = noOfSrvCompleted
            self.noOfSrvFailed = noOfSrvFailed
            self.outputs = outputs
            self.owner = owner
            self.previous = previous
            self.scriptOutputLocation = scriptOutputLocation
            self.status = status
            self.statusMessage = statusMessage
            self.stepActionType = stepActionType
            self.stepGroupId = stepGroupId
            self.stepId = stepId
            self.stepTarget = stepTarget
            self.totalNoOfSrv = totalNoOfSrv
            self.workflowId = workflowId
            self.workflowStepAutomationConfiguration = workflowStepAutomationConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "creationTime"
            case description = "description"
            case endTime = "endTime"
            case lastStartTime = "lastStartTime"
            case name = "name"
            case next = "next"
            case noOfSrvCompleted = "noOfSrvCompleted"
            case noOfSrvFailed = "noOfSrvFailed"
            case outputs = "outputs"
            case owner = "owner"
            case previous = "previous"
            case scriptOutputLocation = "scriptOutputLocation"
            case status = "status"
            case statusMessage = "statusMessage"
            case stepActionType = "stepActionType"
            case stepGroupId = "stepGroupId"
            case stepId = "stepId"
            case stepTarget = "stepTarget"
            case totalNoOfSrv = "totalNoOfSrv"
            case workflowId = "workflowId"
            case workflowStepAutomationConfiguration = "workflowStepAutomationConfiguration"
        }
    }

    public struct ListMigrationWorkflowTemplatesRequest: AWSEncodableShape {
        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The name of the template.
        public let name: String?
        /// The pagination token.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, name: String? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.name, key: "name")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListMigrationWorkflowTemplatesResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The summary of the template.
        public let templateSummary: [TemplateSummary]

        @inlinable
        public init(nextToken: String? = nil, templateSummary: [TemplateSummary]) {
            self.nextToken = nextToken
            self.templateSummary = templateSummary
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case templateSummary = "templateSummary"
        }
    }

    public struct ListMigrationWorkflowsRequest: AWSEncodableShape {
        /// The name of the application configured in Application Discovery Service.
        public let adsApplicationConfigurationName: String?
        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The name of the migration workflow.
        public let name: String?
        /// The pagination token.
        public let nextToken: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The ID of the template.
        public let templateId: String?

        @inlinable
        public init(adsApplicationConfigurationName: String? = nil, maxResults: Int? = nil, name: String? = nil, nextToken: String? = nil, status: MigrationWorkflowStatusEnum? = nil, templateId: String? = nil) {
            self.adsApplicationConfigurationName = adsApplicationConfigurationName
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
            self.status = status
            self.templateId = templateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.adsApplicationConfigurationName, key: "adsApplicationConfigurationName")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.name, key: "name")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.status, key: "status")
            request.encodeQuery(self.templateId, key: "templateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.adsApplicationConfigurationName, name: "adsApplicationConfigurationName", parent: name, max: 100)
            try self.validate(self.adsApplicationConfigurationName, name: "adsApplicationConfigurationName", parent: name, min: 1)
            try self.validate(self.adsApplicationConfigurationName, name: "adsApplicationConfigurationName", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
            try self.validate(self.templateId, name: "templateId", parent: name, max: 100)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListMigrationWorkflowsResponse: AWSDecodableShape {
        /// The summary of the migration workflow.
        public let migrationWorkflowSummary: [MigrationWorkflowSummary]
        /// The pagination token.
        public let nextToken: String?

        @inlinable
        public init(migrationWorkflowSummary: [MigrationWorkflowSummary], nextToken: String? = nil) {
            self.migrationWorkflowSummary = migrationWorkflowSummary
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case migrationWorkflowSummary = "migrationWorkflowSummary"
            case nextToken = "nextToken"
        }
    }

    public struct ListPluginsRequest: AWSEncodableShape {
        /// The maximum number of plugins that can be returned.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPluginsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// Migration Hub Orchestrator plugins.
        public let plugins: [PluginSummary]?

        @inlinable
        public init(nextToken: String? = nil, plugins: [PluginSummary]? = nil) {
            self.nextToken = nextToken
            self.plugins = plugins
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case plugins = "plugins"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:migrationhub-orchestrator:[a-z0-9-]+:[0-9]+:(template|workflow)/[.]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags added to a resource.
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct ListTemplateStepGroupsRequest: AWSEncodableShape {
        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The ID of the template.
        public let templateId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, templateId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.templateId = templateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodePath(self.templateId, key: "templateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
            try self.validate(self.templateId, name: "templateId", parent: name, max: 100)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTemplateStepGroupsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The summary of the step group in the template.
        public let templateStepGroupSummary: [TemplateStepGroupSummary]

        @inlinable
        public init(nextToken: String? = nil, templateStepGroupSummary: [TemplateStepGroupSummary]) {
            self.nextToken = nextToken
            self.templateStepGroupSummary = templateStepGroupSummary
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case templateStepGroupSummary = "templateStepGroupSummary"
        }
    }

    public struct ListTemplateStepsRequest: AWSEncodableShape {
        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The ID of the step group.
        public let stepGroupId: String
        /// The ID of the template.
        public let templateId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, stepGroupId: String, templateId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.stepGroupId = stepGroupId
            self.templateId = templateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.stepGroupId, key: "stepGroupId")
            request.encodeQuery(self.templateId, key: "templateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.templateId, name: "templateId", parent: name, max: 100)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTemplateStepsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The list of summaries of steps in a template.
        public let templateStepSummaryList: [TemplateStepSummary]?

        @inlinable
        public init(nextToken: String? = nil, templateStepSummaryList: [TemplateStepSummary]? = nil) {
            self.nextToken = nextToken
            self.templateStepSummaryList = templateStepSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case templateStepSummaryList = "templateStepSummaryList"
        }
    }

    public struct ListWorkflowStepGroupsRequest: AWSEncodableShape {
        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The ID of the migration workflow.
        public let workflowId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, workflowId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.workflowId = workflowId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.workflowId, key: "workflowId")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListWorkflowStepGroupsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The summary of step groups in a migration workflow.
        public let workflowStepGroupsSummary: [WorkflowStepGroupSummary]

        @inlinable
        public init(nextToken: String? = nil, workflowStepGroupsSummary: [WorkflowStepGroupSummary]) {
            self.nextToken = nextToken
            self.workflowStepGroupsSummary = workflowStepGroupsSummary
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case workflowStepGroupsSummary = "workflowStepGroupsSummary"
        }
    }

    public struct ListWorkflowStepsRequest: AWSEncodableShape {
        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The ID of the step group.
        public let stepGroupId: String
        /// The ID of the migration workflow.
        public let workflowId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, stepGroupId: String, workflowId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodePath(self.stepGroupId, key: "stepGroupId")
            request.encodePath(self.workflowId, key: "workflowId")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListWorkflowStepsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The summary of steps in a migration workflow.
        public let workflowStepsSummary: [WorkflowStepSummary]

        @inlinable
        public init(nextToken: String? = nil, workflowStepsSummary: [WorkflowStepSummary]) {
            self.nextToken = nextToken
            self.workflowStepsSummary = workflowStepsSummary
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case workflowStepsSummary = "workflowStepsSummary"
        }
    }

    public struct MigrationWorkflowSummary: AWSDecodableShape {
        /// The name of the application configured in Application Discovery Service.
        public let adsApplicationConfigurationName: String?
        /// The steps completed in the migration workflow.
        public let completedSteps: Int?
        /// The time at which the migration workflow was created.
        public let creationTime: Date?
        /// The time at which the migration workflow ended.
        public let endTime: Date?
        /// The ID of the migration workflow.
        public let id: String?
        /// The name of the migration workflow.
        public let name: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The status message of the migration workflow.
        public let statusMessage: String?
        /// The ID of the template.
        public let templateId: String?
        /// All the steps in a migration workflow.
        public let totalSteps: Int?

        @inlinable
        public init(adsApplicationConfigurationName: String? = nil, completedSteps: Int? = nil, creationTime: Date? = nil, endTime: Date? = nil, id: String? = nil, name: String? = nil, status: MigrationWorkflowStatusEnum? = nil, statusMessage: String? = nil, templateId: String? = nil, totalSteps: Int? = nil) {
            self.adsApplicationConfigurationName = adsApplicationConfigurationName
            self.completedSteps = completedSteps
            self.creationTime = creationTime
            self.endTime = endTime
            self.id = id
            self.name = name
            self.status = status
            self.statusMessage = statusMessage
            self.templateId = templateId
            self.totalSteps = totalSteps
        }

        private enum CodingKeys: String, CodingKey {
            case adsApplicationConfigurationName = "adsApplicationConfigurationName"
            case completedSteps = "completedSteps"
            case creationTime = "creationTime"
            case endTime = "endTime"
            case id = "id"
            case name = "name"
            case status = "status"
            case statusMessage = "statusMessage"
            case templateId = "templateId"
            case totalSteps = "totalSteps"
        }
    }

    public struct PlatformCommand: AWSEncodableShape & AWSDecodableShape {
        /// Command for Linux.
        public let linux: String?
        /// Command for Windows.
        public let windows: String?

        @inlinable
        public init(linux: String? = nil, windows: String? = nil) {
            self.linux = linux
            self.windows = windows
        }

        private enum CodingKeys: String, CodingKey {
            case linux = "linux"
            case windows = "windows"
        }
    }

    public struct PlatformScriptKey: AWSEncodableShape & AWSDecodableShape {
        /// The script location for Linux.
        public let linux: String?
        /// The script location for Windows.
        public let windows: String?

        @inlinable
        public init(linux: String? = nil, windows: String? = nil) {
            self.linux = linux
            self.windows = windows
        }

        public func validate(name: String) throws {
            try self.validate(self.linux, name: "linux", parent: name, max: 1024)
            try self.validate(self.windows, name: "windows", parent: name, max: 1024)
        }

        private enum CodingKeys: String, CodingKey {
            case linux = "linux"
            case windows = "windows"
        }
    }

    public struct PluginSummary: AWSDecodableShape {
        /// The name of the host.
        public let hostname: String?
        /// The IP address at which the plugin is located.
        public let ipAddress: String?
        /// The ID of the plugin.
        public let pluginId: String?
        /// The time at which the plugin was registered.
        public let registeredTime: String?
        /// The status of the plugin.
        public let status: PluginHealth?
        /// The version of the plugin.
        public let version: String?

        @inlinable
        public init(hostname: String? = nil, ipAddress: String? = nil, pluginId: String? = nil, registeredTime: String? = nil, status: PluginHealth? = nil, version: String? = nil) {
            self.hostname = hostname
            self.ipAddress = ipAddress
            self.pluginId = pluginId
            self.registeredTime = registeredTime
            self.status = status
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case hostname = "hostname"
            case ipAddress = "ipAddress"
            case pluginId = "pluginId"
            case registeredTime = "registeredTime"
            case status = "status"
            case version = "version"
        }
    }

    public struct RetryWorkflowStepRequest: AWSEncodableShape {
        /// The ID of the step.
        public let id: String
        /// The ID of the step group.
        public let stepGroupId: String
        /// The ID of the migration workflow.
        public let workflowId: String

        @inlinable
        public init(id: String, stepGroupId: String, workflowId: String) {
            self.id = id
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodeQuery(self.stepGroupId, key: "stepGroupId")
            request.encodeQuery(self.workflowId, key: "workflowId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RetryWorkflowStepResponse: AWSDecodableShape {
        /// The ID of the step.
        public let id: String?
        /// The status of the step.
        public let status: StepStatus?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The ID of the migration workflow.
        public let workflowId: String?

        @inlinable
        public init(id: String? = nil, status: StepStatus? = nil, stepGroupId: String? = nil, workflowId: String? = nil) {
            self.id = id
            self.status = status
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case status = "status"
            case stepGroupId = "stepGroupId"
            case workflowId = "workflowId"
        }
    }

    public struct StartMigrationWorkflowRequest: AWSEncodableShape {
        /// The ID of the migration workflow.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StartMigrationWorkflowResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// The ID of the migration workflow.
        public let id: String?
        /// The time at which the migration workflow was last started.
        public let lastStartTime: Date?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The status message of the migration workflow.
        public let statusMessage: String?

        @inlinable
        public init(arn: String? = nil, id: String? = nil, lastStartTime: Date? = nil, status: MigrationWorkflowStatusEnum? = nil, statusMessage: String? = nil) {
            self.arn = arn
            self.id = id
            self.lastStartTime = lastStartTime
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case id = "id"
            case lastStartTime = "lastStartTime"
            case status = "status"
            case statusMessage = "statusMessage"
        }
    }

    public struct StepAutomationConfiguration: AWSDecodableShape {
        /// The command to run the script.
        public let command: PlatformCommand?
        /// The source or target environment.
        public let runEnvironment: RunEnvironment?
        /// The Amazon S3 bucket where the script is located.
        public let scriptLocationS3Bucket: String?
        /// The Amazon S3 key for the script location.
        public let scriptLocationS3Key: PlatformScriptKey?
        /// The servers on which to run the script.
        public let targetType: TargetType?

        @inlinable
        public init(command: PlatformCommand? = nil, runEnvironment: RunEnvironment? = nil, scriptLocationS3Bucket: String? = nil, scriptLocationS3Key: PlatformScriptKey? = nil, targetType: TargetType? = nil) {
            self.command = command
            self.runEnvironment = runEnvironment
            self.scriptLocationS3Bucket = scriptLocationS3Bucket
            self.scriptLocationS3Key = scriptLocationS3Key
            self.targetType = targetType
        }

        private enum CodingKeys: String, CodingKey {
            case command = "command"
            case runEnvironment = "runEnvironment"
            case scriptLocationS3Bucket = "scriptLocationS3Bucket"
            case scriptLocationS3Key = "scriptLocationS3Key"
            case targetType = "targetType"
        }
    }

    public struct StepOutput: AWSDecodableShape {
        /// The data type of the step output.
        public let dataType: DataType?
        /// The name of the step.
        public let name: String?
        /// Determine if an output is required from a step.
        public let required: Bool?

        @inlinable
        public init(dataType: DataType? = nil, name: String? = nil, required: Bool? = nil) {
            self.dataType = dataType
            self.name = name
            self.required = required
        }

        private enum CodingKeys: String, CodingKey {
            case dataType = "dataType"
            case name = "name"
            case required = "required"
        }
    }

    public struct StopMigrationWorkflowRequest: AWSEncodableShape {
        /// The ID of the migration workflow.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StopMigrationWorkflowResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// The ID of the migration workflow.
        public let id: String?
        /// The time at which the migration workflow was stopped.
        public let lastStopTime: Date?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The status message of the migration workflow.
        public let statusMessage: String?

        @inlinable
        public init(arn: String? = nil, id: String? = nil, lastStopTime: Date? = nil, status: MigrationWorkflowStatusEnum? = nil, statusMessage: String? = nil) {
            self.arn = arn
            self.id = id
            self.lastStopTime = lastStopTime
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case id = "id"
            case lastStopTime = "lastStopTime"
            case status = "status"
            case statusMessage = "statusMessage"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource to which you want to add tags.
        public let resourceArn: String
        /// A collection of labels, in the form of key:value pairs, that apply to this resource.
        public let tags: [String: String]

        @inlinable
        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
            try container.encode(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:migrationhub-orchestrator:[a-z0-9-]+:[0-9]+:(template|workflow)/[.]*$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TemplateInput: AWSDecodableShape {
        /// The data type of the template input.
        public let dataType: DataType?
        /// The name of the template.
        public let inputName: String?
        /// Determine if an input is required from the template.
        public let required: Bool?

        @inlinable
        public init(dataType: DataType? = nil, inputName: String? = nil, required: Bool? = nil) {
            self.dataType = dataType
            self.inputName = inputName
            self.required = required
        }

        private enum CodingKeys: String, CodingKey {
            case dataType = "dataType"
            case inputName = "inputName"
            case required = "required"
        }
    }

    public struct TemplateStepGroupSummary: AWSDecodableShape {
        /// The ID of the step group.
        public let id: String?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?

        @inlinable
        public init(id: String? = nil, name: String? = nil, next: [String]? = nil, previous: [String]? = nil) {
            self.id = id
            self.name = name
            self.next = next
            self.previous = previous
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case name = "name"
            case next = "next"
            case previous = "previous"
        }
    }

    public struct TemplateStepSummary: AWSDecodableShape {
        /// The ID of the step.
        public let id: String?
        /// The name of the step.
        public let name: String?
        /// The next step.
        public let next: [String]?
        /// The owner of the step.
        public let owner: Owner?
        /// The previous step.
        public let previous: [String]?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The servers on which to run the script.
        public let targetType: TargetType?
        /// The ID of the template.
        public let templateId: String?

        @inlinable
        public init(id: String? = nil, name: String? = nil, next: [String]? = nil, owner: Owner? = nil, previous: [String]? = nil, stepActionType: StepActionType? = nil, stepGroupId: String? = nil, targetType: TargetType? = nil, templateId: String? = nil) {
            self.id = id
            self.name = name
            self.next = next
            self.owner = owner
            self.previous = previous
            self.stepActionType = stepActionType
            self.stepGroupId = stepGroupId
            self.targetType = targetType
            self.templateId = templateId
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case name = "name"
            case next = "next"
            case owner = "owner"
            case previous = "previous"
            case stepActionType = "stepActionType"
            case stepGroupId = "stepGroupId"
            case targetType = "targetType"
            case templateId = "templateId"
        }
    }

    public struct TemplateSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the template.
        public let arn: String?
        /// The description of the template.
        public let description: String?
        /// The ID of the template.
        public let id: String?
        /// The name of the template.
        public let name: String?

        @inlinable
        public init(arn: String? = nil, description: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.description = description
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case description = "description"
            case id = "id"
            case name = "name"
        }
    }

    public struct Tool: AWSDecodableShape {
        /// The name of an AWS service.
        public let name: String?
        /// The URL of an AWS service.
        public let url: String?

        @inlinable
        public init(name: String? = nil, url: String? = nil) {
            self.name = name
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case url = "url"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource from which you want to remove tags.
        public let resourceArn: String
        /// One or more tag keys. Specify only the tag keys, not the tag values.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
            request.encodeQuery(self.tagKeys, key: "tagKeys")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:migrationhub-orchestrator:[a-z0-9-]+:[0-9]+:(template|workflow)/[.]*$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateMigrationWorkflowRequest: AWSEncodableShape {
        /// The description of the migration workflow.
        public let description: String?
        /// The ID of the migration workflow.
        public let id: String
        /// The input parameters required to update a migration workflow.
        public let inputParameters: [String: StepInput]?
        /// The name of the migration workflow.
        public let name: String?
        /// The servers on which a step will be run.
        public let stepTargets: [String]?

        @inlinable
        public init(description: String? = nil, id: String, inputParameters: [String: StepInput]? = nil, name: String? = nil, stepTargets: [String]? = nil) {
            self.description = description
            self.id = id
            self.inputParameters = inputParameters
            self.name = name
            self.stepTargets = stepTargets
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.description, forKey: .description)
            request.encodePath(self.id, key: "id")
            try container.encodeIfPresent(self.inputParameters, forKey: .inputParameters)
            try container.encodeIfPresent(self.name, forKey: .name)
            try container.encodeIfPresent(self.stepTargets, forKey: .stepTargets)
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.inputParameters?.forEach {
                try validate($0.key, name: "inputParameters.key", parent: name, max: 100)
                try validate($0.key, name: "inputParameters.key", parent: name, min: 1)
                try validate($0.key, name: "inputParameters.key", parent: name, pattern: "^[a-zA-Z0-9-_ ()]+$")
                try $0.value.validate(name: "\(name).inputParameters[\"\($0.key)\"]")
            }
            try self.stepTargets?.forEach {
                try validate($0, name: "stepTargets[]", parent: name, max: 500)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case inputParameters = "inputParameters"
            case name = "name"
            case stepTargets = "stepTargets"
        }
    }

    public struct UpdateMigrationWorkflowResponse: AWSDecodableShape {
        /// The ID of the application configured in Application Discovery Service.
        public let adsApplicationConfigurationId: String?
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// The time at which the migration workflow was created.
        public let creationTime: Date?
        /// The description of the migration workflow.
        public let description: String?
        /// The ID of the migration workflow.
        public let id: String?
        /// The time at which the migration workflow was last modified.
        public let lastModifiedTime: Date?
        /// The name of the migration workflow.
        public let name: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The servers on which a step will be run.
        public let stepTargets: [String]?
        /// The tags added to the migration workflow.
        public let tags: [String: String]?
        /// The ID of the template.
        public let templateId: String?
        /// The inputs required to update a migration workflow.
        public let workflowInputs: [String: StepInput]?

        @inlinable
        public init(adsApplicationConfigurationId: String? = nil, arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastModifiedTime: Date? = nil, name: String? = nil, status: MigrationWorkflowStatusEnum? = nil, stepTargets: [String]? = nil, tags: [String: String]? = nil, templateId: String? = nil, workflowInputs: [String: StepInput]? = nil) {
            self.adsApplicationConfigurationId = adsApplicationConfigurationId
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.status = status
            self.stepTargets = stepTargets
            self.tags = tags
            self.templateId = templateId
            self.workflowInputs = workflowInputs
        }

        private enum CodingKeys: String, CodingKey {
            case adsApplicationConfigurationId = "adsApplicationConfigurationId"
            case arn = "arn"
            case creationTime = "creationTime"
            case description = "description"
            case id = "id"
            case lastModifiedTime = "lastModifiedTime"
            case name = "name"
            case status = "status"
            case stepTargets = "stepTargets"
            case tags = "tags"
            case templateId = "templateId"
            case workflowInputs = "workflowInputs"
        }
    }

    public struct UpdateTemplateRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The ID of the request to update a migration workflow template.
        public let id: String
        /// The description of the migration workflow template to update.
        public let templateDescription: String?
        /// The name of the migration workflow template to update.
        public let templateName: String?

        @inlinable
        public init(clientToken: String? = UpdateTemplateRequest.idempotencyToken(), id: String, templateDescription: String? = nil, templateName: String? = nil) {
            self.clientToken = clientToken
            self.id = id
            self.templateDescription = templateDescription
            self.templateName = templateName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.clientToken, forKey: .clientToken)
            request.encodePath(self.id, key: "id")
            try container.encodeIfPresent(self.templateDescription, forKey: .templateDescription)
            try container.encodeIfPresent(self.templateName, forKey: .templateName)
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[-a-zA-Z0-9]*$")
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case templateDescription = "templateDescription"
            case templateName = "templateName"
        }
    }

    public struct UpdateTemplateResponse: AWSDecodableShape {
        /// The tags added to the migration workflow template.
        public let tags: [String: String]?
        /// The ARN of the migration workflow template being updated. The format for an Migration Hub Orchestrator template ARN is arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234. For more information about ARNs, see Amazon Resource Names (ARNs) in the AWS General Reference.
        public let templateArn: String?
        /// The ID of the migration workflow template being updated.
        public let templateId: String?

        @inlinable
        public init(tags: [String: String]? = nil, templateArn: String? = nil, templateId: String? = nil) {
            self.tags = tags
            self.templateArn = templateArn
            self.templateId = templateId
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
            case templateArn = "templateArn"
            case templateId = "templateId"
        }
    }

    public struct UpdateWorkflowStepGroupRequest: AWSEncodableShape {
        /// The description of the step group.
        public let description: String?
        /// The ID of the step group.
        public let id: String
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?
        /// The ID of the migration workflow.
        public let workflowId: String

        @inlinable
        public init(description: String? = nil, id: String, name: String? = nil, next: [String]? = nil, previous: [String]? = nil, workflowId: String) {
            self.description = description
            self.id = id
            self.name = name
            self.next = next
            self.previous = previous
            self.workflowId = workflowId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.description, forKey: .description)
            request.encodePath(self.id, key: "id")
            try container.encodeIfPresent(self.name, forKey: .name)
            try container.encodeIfPresent(self.next, forKey: .next)
            try container.encodeIfPresent(self.previous, forKey: .previous)
            request.encodeQuery(self.workflowId, key: "workflowId")
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[-a-zA-Z0-9_.+, ]*$")
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.next?.forEach {
                try validate($0, name: "next[]", parent: name, max: 500)
            }
            try self.previous?.forEach {
                try validate($0, name: "previous[]", parent: name, max: 500)
            }
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case name = "name"
            case next = "next"
            case previous = "previous"
        }
    }

    public struct UpdateWorkflowStepGroupResponse: AWSDecodableShape {
        /// The description of the step group.
        public let description: String?
        /// The ID of the step group.
        public let id: String?
        /// The time at which the step group was last modified.
        public let lastModifiedTime: Date?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?
        /// The ID of the migration workflow.
        public let workflowId: String?

        @inlinable
        public init(description: String? = nil, id: String? = nil, lastModifiedTime: Date? = nil, name: String? = nil, next: [String]? = nil, previous: [String]? = nil, tools: [Tool]? = nil, workflowId: String? = nil) {
            self.description = description
            self.id = id
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.next = next
            self.previous = previous
            self.tools = tools
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case id = "id"
            case lastModifiedTime = "lastModifiedTime"
            case name = "name"
            case next = "next"
            case previous = "previous"
            case tools = "tools"
            case workflowId = "workflowId"
        }
    }

    public struct UpdateWorkflowStepRequest: AWSEncodableShape {
        /// The description of the step.
        public let description: String?
        /// The ID of the step.
        public let id: String
        /// The name of the step.
        public let name: String?
        /// The next step.
        public let next: [String]?
        /// The outputs of a step.
        public let outputs: [WorkflowStepOutput]?
        /// The previous step.
        public let previous: [String]?
        /// The status of the step.
        public let status: StepStatus?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType?
        /// The ID of the step group.
        public let stepGroupId: String
        /// The servers on which a step will be run.
        public let stepTarget: [String]?
        /// The ID of the migration workflow.
        public let workflowId: String
        /// The custom script to run tests on the source and target environments.
        public let workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration?

        @inlinable
        public init(description: String? = nil, id: String, name: String? = nil, next: [String]? = nil, outputs: [WorkflowStepOutput]? = nil, previous: [String]? = nil, status: StepStatus? = nil, stepActionType: StepActionType? = nil, stepGroupId: String, stepTarget: [String]? = nil, workflowId: String, workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration? = nil) {
            self.description = description
            self.id = id
            self.name = name
            self.next = next
            self.outputs = outputs
            self.previous = previous
            self.status = status
            self.stepActionType = stepActionType
            self.stepGroupId = stepGroupId
            self.stepTarget = stepTarget
            self.workflowId = workflowId
            self.workflowStepAutomationConfiguration = workflowStepAutomationConfiguration
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.description, forKey: .description)
            request.encodePath(self.id, key: "id")
            try container.encodeIfPresent(self.name, forKey: .name)
            try container.encodeIfPresent(self.next, forKey: .next)
            try container.encodeIfPresent(self.outputs, forKey: .outputs)
            try container.encodeIfPresent(self.previous, forKey: .previous)
            try container.encodeIfPresent(self.status, forKey: .status)
            try container.encodeIfPresent(self.stepActionType, forKey: .stepActionType)
            try container.encode(self.stepGroupId, forKey: .stepGroupId)
            try container.encodeIfPresent(self.stepTarget, forKey: .stepTarget)
            try container.encode(self.workflowId, forKey: .workflowId)
            try container.encodeIfPresent(self.workflowStepAutomationConfiguration, forKey: .workflowStepAutomationConfiguration)
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[-a-zA-Z0-9_.+, ]*$")
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.next?.forEach {
                try validate($0, name: "next[]", parent: name, max: 500)
            }
            try self.outputs?.forEach {
                try $0.validate(name: "\(name).outputs[]")
            }
            try self.previous?.forEach {
                try validate($0, name: "previous[]", parent: name, max: 500)
            }
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.stepTarget?.forEach {
                try validate($0, name: "stepTarget[]", parent: name, max: 500)
            }
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.workflowStepAutomationConfiguration?.validate(name: "\(name).workflowStepAutomationConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case name = "name"
            case next = "next"
            case outputs = "outputs"
            case previous = "previous"
            case status = "status"
            case stepActionType = "stepActionType"
            case stepGroupId = "stepGroupId"
            case stepTarget = "stepTarget"
            case workflowId = "workflowId"
            case workflowStepAutomationConfiguration = "workflowStepAutomationConfiguration"
        }
    }

    public struct UpdateWorkflowStepResponse: AWSDecodableShape {
        /// The ID of the step.
        public let id: String?
        /// The name of the step.
        public let name: String?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The ID of the migration workflow.
        public let workflowId: String?

        @inlinable
        public init(id: String? = nil, name: String? = nil, stepGroupId: String? = nil, workflowId: String? = nil) {
            self.id = id
            self.name = name
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case name = "name"
            case stepGroupId = "stepGroupId"
            case workflowId = "workflowId"
        }
    }

    public struct WorkflowStepAutomationConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The command required to run the script.
        public let command: PlatformCommand?
        /// The source or target environment.
        public let runEnvironment: RunEnvironment?
        /// The Amazon S3 bucket where the script is located.
        public let scriptLocationS3Bucket: String?
        /// The Amazon S3 key for the script location.
        public let scriptLocationS3Key: PlatformScriptKey?
        /// The servers on which to run the script.
        public let targetType: TargetType?

        @inlinable
        public init(command: PlatformCommand? = nil, runEnvironment: RunEnvironment? = nil, scriptLocationS3Bucket: String? = nil, scriptLocationS3Key: PlatformScriptKey? = nil, targetType: TargetType? = nil) {
            self.command = command
            self.runEnvironment = runEnvironment
            self.scriptLocationS3Bucket = scriptLocationS3Bucket
            self.scriptLocationS3Key = scriptLocationS3Key
            self.targetType = targetType
        }

        public func validate(name: String) throws {
            try self.validate(self.scriptLocationS3Bucket, name: "scriptLocationS3Bucket", parent: name, max: 63)
            try self.validate(self.scriptLocationS3Bucket, name: "scriptLocationS3Bucket", parent: name, pattern: "^[0-9a-z]+[0-9a-z\\.\\-]*[0-9a-z]+$")
            try self.scriptLocationS3Key?.validate(name: "\(name).scriptLocationS3Key")
        }

        private enum CodingKeys: String, CodingKey {
            case command = "command"
            case runEnvironment = "runEnvironment"
            case scriptLocationS3Bucket = "scriptLocationS3Bucket"
            case scriptLocationS3Key = "scriptLocationS3Key"
            case targetType = "targetType"
        }
    }

    public struct WorkflowStepGroupSummary: AWSDecodableShape {
        /// The ID of the step group.
        public let id: String?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The owner of the step group.
        public let owner: Owner?
        /// The previous step group.
        public let previous: [String]?
        /// The status of the step group.
        public let status: StepGroupStatus?

        @inlinable
        public init(id: String? = nil, name: String? = nil, next: [String]? = nil, owner: Owner? = nil, previous: [String]? = nil, status: StepGroupStatus? = nil) {
            self.id = id
            self.name = name
            self.next = next
            self.owner = owner
            self.previous = previous
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case name = "name"
            case next = "next"
            case owner = "owner"
            case previous = "previous"
            case status = "status"
        }
    }

    public struct WorkflowStepOutput: AWSEncodableShape & AWSDecodableShape {
        /// The data type of the output.
        public let dataType: DataType?
        /// The name of the step.
        public let name: String?
        /// Determine if an output is required from a step.
        public let required: Bool?
        /// The value of the output.
        public let value: WorkflowStepOutputUnion?

        @inlinable
        public init(dataType: DataType? = nil, name: String? = nil, required: Bool? = nil, value: WorkflowStepOutputUnion? = nil) {
            self.dataType = dataType
            self.name = name
            self.required = required
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.value?.validate(name: "\(name).value")
        }

        private enum CodingKeys: String, CodingKey {
            case dataType = "dataType"
            case name = "name"
            case required = "required"
            case value = "value"
        }
    }

    public struct WorkflowStepSummary: AWSDecodableShape {
        /// The description of the step.
        public let description: String?
        /// The name of the step.
        public let name: String?
        /// The next step.
        public let next: [String]?
        /// The number of servers that have been migrated.
        public let noOfSrvCompleted: Int?
        /// The number of servers that have failed to migrate.
        public let noOfSrvFailed: Int?
        /// The owner of the step.
        public let owner: Owner?
        /// The previous step.
        public let previous: [String]?
        /// The location of the script.
        public let scriptLocation: String?
        /// The status of the step.
        public let status: StepStatus?
        /// The status message of the migration workflow.
        public let statusMessage: String?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType?
        /// The ID of the step.
        public let stepId: String?
        /// The total number of servers that have been migrated.
        public let totalNoOfSrv: Int?

        @inlinable
        public init(description: String? = nil, name: String? = nil, next: [String]? = nil, noOfSrvCompleted: Int? = nil, noOfSrvFailed: Int? = nil, owner: Owner? = nil, previous: [String]? = nil, scriptLocation: String? = nil, status: StepStatus? = nil, statusMessage: String? = nil, stepActionType: StepActionType? = nil, stepId: String? = nil, totalNoOfSrv: Int? = nil) {
            self.description = description
            self.name = name
            self.next = next
            self.noOfSrvCompleted = noOfSrvCompleted
            self.noOfSrvFailed = noOfSrvFailed
            self.owner = owner
            self.previous = previous
            self.scriptLocation = scriptLocation
            self.status = status
            self.statusMessage = statusMessage
            self.stepActionType = stepActionType
            self.stepId = stepId
            self.totalNoOfSrv = totalNoOfSrv
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case name = "name"
            case next = "next"
            case noOfSrvCompleted = "noOfSrvCompleted"
            case noOfSrvFailed = "noOfSrvFailed"
            case owner = "owner"
            case previous = "previous"
            case scriptLocation = "scriptLocation"
            case status = "status"
            case statusMessage = "statusMessage"
            case stepActionType = "stepActionType"
            case stepId = "stepId"
            case totalNoOfSrv = "totalNoOfSrv"
        }
    }

    public struct TemplateSource: AWSEncodableShape {
        /// The ID of the workflow from the source migration workflow template.
        public let workflowId: String?

        @inlinable
        public init(workflowId: String? = nil) {
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case workflowId = "workflowId"
        }
    }
}

// MARK: - Errors

/// Error enum for MigrationHubOrchestrator
public struct MigrationHubOrchestratorErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case conflictException = "ConflictException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case throttlingException = "ThrottlingException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize MigrationHubOrchestrator
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// You do not have sufficient access to perform this action.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// This exception is thrown when an attempt to update or delete a resource would cause an inconsistent state.
    public static var conflictException: Self { .init(.conflictException) }
    /// An internal error has occurred.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The resource is not available.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The request was denied due to request throttling.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// The input fails to satisfy the constraints specified by an AWS service.
    public static var validationException: Self { .init(.validationException) }
}

extension MigrationHubOrchestratorErrorType: Equatable {
    public static func == (lhs: MigrationHubOrchestratorErrorType, rhs: MigrationHubOrchestratorErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension MigrationHubOrchestratorErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
